<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>

<form:form commandName="map" cssClass="form-horizontal" role="form">
    <div class="form-group">
        <label class="col-sm-2 control-label no-padding-right">任务名称</label>
        <div class="col-sm-8">
            <input type="text" value="${map.message.taskName}" name="taskNam" class="form-control" readonly>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label no-padding-right">反馈单位</label>
        <div class="col-sm-8">
            <input type="text" value="${map.message.sendDeptName}" name="sendDeptName"  class="form-control" readonly>
        </div>
    </div>
    <div id="backList">

            <div class="form-group">
                <label class="col-sm-2 control-label no-padding-right">反馈内容</label>
                <div class="col-sm-8">
                    <textarea rows="5" class="form-control" readonly name="content" >${map.taskBack.content}</textarea>
                </div>
            </div>
        <div class="form-group">
            <label class="col-sm-2 control-label no-padding-right">反馈附件</label>
            <c:if test="${empty map.taskBack.file}">
                <div class="col-sm-3">
                    <input type="text" value="无反馈附件" class="form-control" readonly>
                </div>
            </c:if>
            <c:if test="${!empty map.taskBack.file}">
                <div class="col-sm-2">
                    <input type="button" value="下载" onclick="downDetail('${map.taskBack.file}')" style="width: 100%; height: 32px;"
                           class="btn-large btn-primary"/>
                </div>
            </c:if>
        </div>
           <%-- <div class="form-group">
                <label class="col-sm-2 control-label no-padding-right">反馈附件</label>
                <div class="col-sm-2">
                    <input type="button" value="下载" onclick="downDetail('${map.taskBack.file}')" name="file" style="width: 100%; height: 32px;"
                           class="btn-large btn-primary"/>
                </div>
            </div>--%>
            <div class="form-group">
                <label class="col-sm-2 control-label no-padding-right" for="result">批复信息</label>
                <div class="col-sm-8">
                    <textarea rows="5" id="result" class="form-control required" name="result">${map.taskBack.result}</textarea>
                </div>
            </div>

    </div>

    <input type="hidden" name="sysId" id="sysId" value="${map.message.backId}">
    <input type="hidden" name="sendId" id="sendId" value="${map.message.sendId}">

</form:form>
<script src="<s:url value="/assets/js/chosen.jquery.js"></s:url>"></script>
<script src="<s:url value="/assets/js/ajaxfileupload.js"></s:url>"></script>
<script src="<s:url value="/assets/js/modal/modal.js"></s:url>"></script>

<script type="text/javascript">
    //下载按钮
    function downDetail(id) {
        var url = "/filesUpload/download/" + id;
        window.open(url);
    }
</script>
